/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package LN;
import Objects.Archguip_Pro;
import Objects.GroupSupplier;
import Objects.Log_Personal;
import Objects.Log_TMarca;
import Objects.Log_TPersonal;
import Objects.Log_TProced;
import Objects.Log_TTransp;
import Objects.Log_Vehiculos;
import Objects.Measure;
import Objects.Sex;
import Objects.Supplier;
import Objects.Unit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
 *
 * @author Personal
 */
public class Ln {
    public String userID;        
    /***************************************************************************/
    /******************************** SESION ***********************************/
    /***************************************************************************/
    /**
     * 
     */
    public void closeApp(){        
//        try{
//            if(Datos.getSesion() == null){
//                Bd.getInstance().cerrarSesion();
//            }else{
//                Bd.getInstance().cerrarSesion(Datos.getSesion());
//            }                   
//                
//        }catch(Exception e){ }
    }
    /***************************************************************************/
    /******************************** LISTS ************************************/
    /***************************************************************************/
    /**
     * 
     * @lista para generar el reporte
     * @param sex
     * @return 
     */
    public static List<Sex>      getList_Sex(Sex[] sex){
        List<Sex> list = new ArrayList<>();        
        list.addAll(Arrays.asList(sex));        
        return list;
    } 
    /**
     * 
     * @lista para generar el reporte
     * @param unit
     * @return 
     */
    public static List<Unit>     getList_Unit(Unit[] unit){
        List<Unit> list = new ArrayList<>();        
        list.addAll(Arrays.asList(unit));        
        return list;
    }
    /**
     * 
     * @lista para generar el reporte
     * @param measure
     * @return 
     */
    public static List<Measure>  getList_Measure(Measure[] measure){
        List<Measure> list = new ArrayList<>();        
        list.addAll(Arrays.asList(measure));        
        return list;
    }
    /**
     * 
     * @lista para generar el reporte
     * @param supplier
     * @return 
     */
    public static List<Supplier> getList_Supplier(Supplier[] supplier){
        List<Supplier> list = new ArrayList<>();        
        list.addAll(Arrays.asList(supplier));        
        return list;
    }
    /**
     * 
     * @lista para generar el reporte
     * @param archguip
     * @return 
     */
    public static List<Archguip_Pro>  getList_log_Archguip(Archguip_Pro[] archguip){
        List<Archguip_Pro> list = new ArrayList<>();        
        list.addAll(Arrays.asList(archguip));        
        return list;
    }
    /**
     * 
     * @lista para generar el reporte
     * @param groupsupplier
     * @return 
     */
    public static List<GroupSupplier> getList_GroupSupplier(GroupSupplier[] groupsupplier){
        List<GroupSupplier> list = new ArrayList<>();        
        list.addAll(Arrays.asList(groupsupplier));        
        return list;
    }      
    /**
     * @author MITM
     * @lista para generar el reporte
     * @param log_ttransp
     * @return 
     */
    public static List<Log_TTransp>   getList_log_TTransp(Log_TTransp[] log_ttransp){
        List<Log_TTransp> list = new ArrayList<>();        
        list.addAll(Arrays.asList(log_ttransp));        
        return list;
    }
    /**
     * @author MITM
     * @lista para generar el reporte
     * @param vehiculo
     * @return 
     */
    public static List<Log_Vehiculos> getList_log_Vehiculos(Log_Vehiculos[] vehiculo){
        List<Log_Vehiculos> list = new ArrayList<>();        
        list.addAll(Arrays.asList(vehiculo));        
        return list;
    }
    /**
     * @author MITM
     * @lista para generar el reporte
     * @param log_tmarca
     * @return 
     */
    public static List<Log_TMarca>    getList_log_TMarca(Log_TMarca[] log_tmarca){
        List<Log_TMarca> list = new ArrayList<>();        
        list.addAll(Arrays.asList(log_tmarca));        
        return list;
    }
    /**
     * @author MITM
     * @lista para generar el reporte
     * @param log_tproced
     * @return 
     */
    public static List<Log_TProced>   getList_log_TProced(Log_TProced[] log_tproced){
        List<Log_TProced> list = new ArrayList<>();        
        list.addAll(Arrays.asList(log_tproced));        
        return list;
    }   
    /**
     * 
     * @param personal
     * @return 
     */
    public static List<Log_Personal>  getList_log_Personal(Log_Personal[] personal){
        List<Log_Personal> list = new ArrayList<>();        
        list.addAll(Arrays.asList(personal));        
        return list;
    }
    /**
     * 
     * @param tpersonal
     * @return 
     */
    public static List<Log_TPersonal> getList_log_TPersonal(Log_TPersonal[] tpersonal){
        List<Log_TPersonal> list = new ArrayList<>();        
        list.addAll(Arrays.asList(tpersonal));        
        return list;
    }
    /***************************************************************************/
    /******************************* SINGLETON *********************************/
    /***************************************************************************/
    private static class LnHolder {   
        private static final Ln INSTANCE = new Ln();
    }
    public static Ln getInstance() {
        return Ln.LnHolder.INSTANCE;
    }            
}
